import java.util.Random;

import cflow.Cflow;


public class Exemplo3 {


	public static void main(String[] args) {
		Cflow c=new Cflow("a(b(c*(d*|e))|f|g)",0,1000);
		Random rand = new Random(System.currentTimeMillis());
		
		int val = rand.nextInt(21);
		
		c.addTransition("a");
		
		if(val < 10){
		c.addTransition("b");	
			while(true){
				c.addTransition("c");
				if(val <= 20){
					c.addTransition("d");
					val += 1;
				}else{
					c.addTransition("e");
					break;
				}
			}
		}else if(val >= 10 || val == 0){
			c.addTransition("f");
			val *= val;
		}else{
			c.addTransition("g");
			val = 2;
		}
	}
	
}
